function deepClone(origin){
  let isInvalid = origin !== null && typeof origin !== 'object' && !Array.isArray(origin)
  if(isInvalid) {
    return origin
  }
  let target = Array.isArray(obj) ? [] : {}
  for(let key in origin) {
    if(origin.hasOwnProperty(key)) {
      let item = origin[key] 
      target[key] = (typeof item === 'object' && item !== null) ? deepClone(origin[key]) : origin[key] 
    }
  }
}

